<template>
  <div class="admin-deal">
    <div>
      <el-breadcrumb separator="/">
        <el-breadcrumb-item :to="{ path: '/admin/index/home' }"
          ><i class="el-icon-s-home"> 首页</i></el-breadcrumb-item
        >
        <el-breadcrumb-item
          ><a href="/admin/index/deal"
            ><i class="el-icon-money">交易信息</i></a
          ></el-breadcrumb-item
        >
      </el-breadcrumb>
    </div>
    <div>
      <div class="admin-deal-head">
        <div class="admin-deal-user">
          <div class="admin-deal-user-icon">
            <img src="../assets/image/dealmoney.png" alt="" />
          </div>
          <div class="admin-deal-user-main">
            <span>34522</span>
            <span>交易金额</span>
          </div>
        </div>
        <div class="admin-deal-user">
          <div class="admin-deal-user-icon" style="background-color: #ff4500">
            <img src="../assets/image/dealmoney.png" alt="" />
          </div>
          <div class="admin-deal-user-main">
            <span>34522</span>
            <span>交易金额</span>
          </div>
        </div>

        <div class="admin-deal-user">
          <div class="admin-deal-user-icon" style="background-color: #7B68EE">
            <img src="../assets/image/dealmoney.png" alt="" />
          </div>
          <div class="admin-deal-user-main">
            <span>34522</span>
            <span>交易金额</span>
          </div>
        </div>

        <div class="admin-deal-user">
          <div class="admin-deal-user-icon" style="background-color: #00bfff">
            <img src="../assets/image/dealmoney.png" alt="" />
          </div>
          <div class="admin-deal-user-main">
            <span>34522</span>
            <span>交易金额</span>
          </div>
        </div>

        <div class="admin-deal-user">
          <div class="admin-deal-user-icon" style="background-color: rgba(255, 215, 0, 0.8)">
            <img src="../assets/image/dealmoney.png" alt="" />
          </div>
          <div class="admin-deal-user-main">
            <span>34522</span>
            <span>交易金额</span>
          </div>
        </div>
      </div>
    </div>

    <div style="width: 90%; height: 600px" id="d1"></div>
  </div>
</template>

<script>
import * as echarts from "echarts";
export default {
  mounted() {
    // 基于准备好的dom，初始化echarts实例
    let chart = echarts.init(document.getElementById("d1"));
    // 绘制图表
    chart.setOption({
      title: {
        text: "月购买订单交易记录",
      },
      tooltip: {},
      xAxis: {
        data: [
          "一月",
          "二月",
          "三月",
          "四月",
          "五月",
          "六月",
          "七月",
          "八月",
          "九月",
          "十月",
          "十一月",
          "十二月",
        ],
      },
      yAxis: {},
      series: [
        {
          name: "购买订单",
          type: "bar",
          data: [5, 20, 36, 10, 190, 20, 5, 20, 220, 10, 10, 20],
        },
      ],
    });
  },
};
</script>

<style lang="scss" scoped>
.admin-deal {
  div {
    .admin-deal-head {
      margin: 20px;
      display: flex;
      justify-content: space-between;
      margin-bottom: 20px;

      .admin-deal-user {
        display: flex;
        border-radius: 4px;
        overflow: hidden;
        .admin-deal-user-icon {
          width: 100px;
          text-align: center;
          height: 60px;
          background-color: #00ced1;
          img {
            width: 28px;
            margin: 16px 0;
          }
        }
        .admin-deal-user-main {
          padding-top: 10px;
          // line-height: 70px;
          width: 160px;
          text-align: center;
          display: flex;
          flex-direction: column;
          border: 1px solid gray;
          border-radius: 0 4px 4px 0;
          border-left: 0px;
        }
      }
    }
  }
  div {
  }
}
</style>